<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>popot-2.01: popot::PSO::topology Namespace Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">popot-2.01
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="namespaces.html"><span>Namespace&#160;List</span></a></li>
      <li><a href="namespacemembers.html"><span>Namespace&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacepopot.html">popot</a>      </li>
      <li class="navelem"><a class="el" href="namespacepopot_1_1PSO.html">PSO</a>      </li>
      <li class="navelem"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html">topology</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">popot::PSO::topology Namespace Reference</div>  </div>
</div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#a1e044578bdbe73eb92ee0062e7c38048">connectParticles</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership, bool *who_informs_whom)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE &gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#a0be7a9e65cb36597c8ed6c477adc9d8d">getNeighborhoodList</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods)</td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE , bool SELF&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#addd5c8fe7edb35d487fdae13ef0e13c7">full_fillNeighborhoods</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Each of the N particles receives information from the N others.  <a href="#addd5c8fe7edb35d487fdae13ef0e13c7"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE , bool SELF&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#a837b692442aa5291538ae2797c728f55">ring_fillNeighborhoods</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A ring topology connects the particles on a ring plus a connection to itself.  <a href="#a837b692442aa5291538ae2797c728f55"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE , bool SELF&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#aae9a2e55ed77c1cef1a2b34bd4f4d8ee">vonNeuman_fillNeighborhoods</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The von Neuman topology connects the particles on a 2D toric grid with the nearest four neighbours plus itself.  <a href="#aae9a2e55ed77c1cef1a2b34bd4f4d8ee"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE , int K, bool SELF&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#aa61407e5352137f1eccb5226bb4d6f58">randomInformants_fillNeighborhoods</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Some probabilistic connectivity so that most of the particles will have K informants.  <a href="#aa61407e5352137f1eccb5226bb4d6f58"></a><br/></td></tr>
<tr><td class="memTemplParams" colspan="2">template&lt;typename PARTICLE , int K, bool SELF&gt; </td></tr>
<tr><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacepopot_1_1PSO_1_1topology.html#af9b65650ff08d7b8fd57555668a8f78c">adaptiveRandom_fillNeighborhoods</a> (std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Some probabilistic connectivity so that most of the particles will have K informants.  <a href="#af9b65650ff08d7b8fd57555668a8f78c"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="af9b65650ff08d7b8fd57555668a8f78c"></a><!-- doxytag: member="popot::PSO::topology::adaptiveRandom_fillNeighborhoods" ref="af9b65650ff08d7b8fd57555668a8f78c" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE , int K, bool SELF&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::adaptiveRandom_fillNeighborhoods </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighborhoods</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighbordhood_membership</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Some probabilistic connectivity so that most of the particles will have K informants. </p>
<p>Adaptive random topology </p>

</div>
</div>
<a class="anchor" id="a1e044578bdbe73eb92ee0062e7c38048"></a><!-- doxytag: member="popot::PSO::topology::connectParticles" ref="a1e044578bdbe73eb92ee0062e7c38048" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership, bool *who_informs_whom)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::connectParticles </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighbordhood_membership</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>who_informs_whom</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Basic topology methods </p>

</div>
</div>
<a class="anchor" id="addd5c8fe7edb35d487fdae13ef0e13c7"></a><!-- doxytag: member="popot::PSO::topology::full_fillNeighborhoods" ref="addd5c8fe7edb35d487fdae13ef0e13c7" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE , bool SELF&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::full_fillNeighborhoods </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighborhoods</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighbordhood_membership</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Each of the N particles receives information from the N others. </p>
<p>Full toplogy </p>

</div>
</div>
<a class="anchor" id="a0be7a9e65cb36597c8ed6c477adc9d8d"></a><!-- doxytag: member="popot::PSO::topology::getNeighborhoodList" ref="a0be7a9e65cb36597c8ed6c477adc9d8d" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::getNeighborhoodList </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighborhoods</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aa61407e5352137f1eccb5226bb4d6f58"></a><!-- doxytag: member="popot::PSO::topology::randomInformants_fillNeighborhoods" ref="aa61407e5352137f1eccb5226bb4d6f58" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE , int K, bool SELF&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::randomInformants_fillNeighborhoods </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighborhoods</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighbordhood_membership</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Some probabilistic connectivity so that most of the particles will have K informants. </p>
<p>Random topology </p>

</div>
</div>
<a class="anchor" id="a837b692442aa5291538ae2797c728f55"></a><!-- doxytag: member="popot::PSO::topology::ring_fillNeighborhoods" ref="a837b692442aa5291538ae2797c728f55" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE , bool SELF&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::ring_fillNeighborhoods </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighborhoods</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighbordhood_membership</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A ring topology connects the particles on a ring plus a connection to itself. </p>
<p>Ring toplogy </p>

</div>
</div>
<a class="anchor" id="aae9a2e55ed77c1cef1a2b34bd4f4d8ee"></a><!-- doxytag: member="popot::PSO::topology::vonNeuman_fillNeighborhoods" ref="aae9a2e55ed77c1cef1a2b34bd4f4d8ee" args="(std::vector&lt; PARTICLE &gt; &amp;particles, std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;neighborhoods, std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;neighbordhood_membership)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PARTICLE , bool SELF&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void popot::PSO::topology::vonNeuman_fillNeighborhoods </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; PARTICLE &gt; &amp;&#160;</td>
          <td class="paramname"><em>particles</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; typename PARTICLE::NeighborhoodType * &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighborhoods</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::map&lt; size_t, std::vector&lt; size_t &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>neighbordhood_membership</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The von Neuman topology connects the particles on a 2D toric grid with the nearest four neighbours plus itself. </p>
<p>Von Neuman topology </p>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>
